﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Telerik.Windows.Controls;
using Telerik.Windows.Documents.Layout;
using Telerik.Windows.Documents.Lists;

namespace DiagnosticCenter.View
{
    public partial class viewOperatorTestQuestion : Page
    {
        public viewOperatorTestQuestion()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {

        }

        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            var toolbarItem = (RadButton)sender;
            switch (Convert.ToInt32(toolbarItem.Tag))
            {
                case 1:
                    editor.ToggleBold();
                    break;
                case 2:
                    editor.ToggleItalic();
                    break;
                case 3:
                    editor.ToggleUnderline();
                    break;
                case 4:
                    editor.ToggleStrikethrough();
                    break;
                case 5:
                    editor.IncrementParagraphLeftIndent();
                    break;
                case 6:
                    editor.DecrementParagraphLeftIndent();
                    break;
                case 7:
                    editor.ChangeListStyle(DefaultListStyles.Bulleted);
                    break;
                case 8:
                    editor.ChangeListStyle(DefaultListStyles.Numbered);
                    break;
                case 9:
                    editor.Undo();
                    break;
                case 10:
                    editor.Redo();
                    break;
                case 11:
                    //editor.InsertHyperlinkDialog.ShowDialog("Бла");
                    break;
                case 12:
                    //editor.InsertImage();
                    break;
                case 13:
                    editor.Cut();
                    break;
                case 14:
                    editor.Copy();
                    break;
                case 15:
                    editor.Paste();
                    break;
                case 16:
                    editor.ChangeTextAlignment(RadTextAlignment.Left);
                    break;
                case 17:
                    editor.ChangeTextAlignment(RadTextAlignment.Center);
                    break;
                case 18:
                    editor.ChangeTextAlignment(RadTextAlignment.Right);
                    break;
                case 19:
                    editor.ChangeTextAlignment(RadTextAlignment.Justify);
                    break;
            }
            
            
        }

    }
}
